package com.cloudpivot.receivales.contract.repository.erpcontract;

import com.cloudpivot.receivales.contract.entity.erpcontract.LastContractId;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface LastContractIdRepository extends JpaRepository<LastContractId,String> {

    /**
     * 获取最后一个合同编号在U8 CM_list表中
     * @return
     */
    @Query(nativeQuery = true, value = "select top 1 strContractID from cm_list where strContractID like 'ZJBSHT01%' order by strContractID desc")
    LastContractId getZJBSLastContractId();


}
